home *** CD-ROM | disk | FTP | other *** search
- ; Hello.world - Displays "Hello, world!"
-
- #include std.equ ; Standard monitor equates
-
- #org 1000 ; Program begins at address 1000 (hexadecimal)
-
- ; Begin program
-
- lda #0c ; 0C=12, clears the screen
- jsr _cout ; monitor routine
- ldy #0a ; load 10 into Y
- jsr down ; and call our routine
- ldx #23 ; X holds count
- jsr _blanks ; print the blanks
- lda >message ; put high byte of MESSAGE in A
- ldx <message ; put low byte of MESSAGE in X
- jsr _print ; monitor routine to print string
- rts ; pointed to by A and X
- .message asc 'Hello, world!' ; here is the string
- hex 0d00 ; 0d is return, 00 ends the string
- .down lda #0d ; the return character
- .again jsr _cout ; monitor print character routine
- dey ; decrease count
- bne again ; if not zero print again
- rts
-
- ; end
-